package com.zsrt.java.day20161223.cg.homework.cal;


import java.util.Scanner;

import org.junit.Test;

//��if else ���д������
public class TestIfElseCal {
	@Test
	public void switchTest(){
		Scanner sc = new Scanner(System.in);
		System.out.println("�������һ����a");
		int a = sc.nextInt();
		System.out.println("������һ������� +-*/%");
		String z = sc.next();
		System.out.println("������ڶ�����b");
		int b = sc.nextInt();
		sc.close();
		
		if("+".equals(z)){	
			System.out.println(" \t"+a+"\n"+"+"+"\t"+b);
			System.out.println("----------");
			System.out.println("\t"+(a+b));
		}else if("-".equals(z)){
			System.out.println(" \t"+a+"\n"+"-"+"\t"+b);
			System.out.println("----------");		
			System.out.println("\t"+(a-b));
		}else if("*".equals(z)){
			System.out.println(" \t"+a+"\n"+"*"+"\t"+b);
			System.out.println("----------");
			System.out.println("\t"+(a*b));
		}else if("/".equals(z)){
			System.out.println(" \t"+a+"\n"+"/"+"\t"+b);
			System.out.println("----------");
			System.out.println("\t"+(a/b));
		}else if("&".equals(z)){
			System.out.println(" \t"+a+"\n"+"%"+"\t"+b);
			System.out.println("----------");
			System.out.println("\t"+(a%b));
		}
			
	}
}
